<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en" class="h100">
<head>
	<meta charset="utf-8" />
	<title>登录页面 - 后台管理</title>
	<!-- basic styles -->
	<link rel="stylesheet" href="/static/assets/css/bootstrap.min.css" />
	<link rel="stylesheet" href="/static/assets/css/font-awesome.min.css" />		
	<!-- ace styles -->
	<link rel="stylesheet" href="/static/assets/css/ace.min.css" />
	<link rel="stylesheet" href="/static/assets/css/style.css" />
	<link rel="stylesheet" href="/static/assets/css/ace-rtl.min.css" />
	
	<script type="text/javascript">
		window.jQuery || document.write("<script src='/static/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
	</script>
	<script type="text/javascript">
		if("ontouchend" in document) document.write("<script src='/static/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
	</script>
	<script src="/static/js/jquery.js"></script>
</head>
<script>
if(top!=this){top.location=this.location;}
<c:if test="${!empty shiroLoginFailure}">
	<c:choose>
		<c:when test="${shiroLoginFailure=='org.apache.shiro.authc.UnknownAccountException'}">
		  $(function(){$(".errorbox").html("用户名不存在");})
		</c:when>
		<c:otherwise>
		  $(function(){$(".errorbox").html("密码错误");})
		</c:otherwise>
	</c:choose>
</c:if>
</script>
<body class="login-layout h100">
	<img class="loginbg" src="/static/assets/images/loginbg.jpg" width="100%" height="100%" />
	<div class="login-container">
		<h1 class="logo center">
			<span class="white">光谷微警务集成管理平台</span>
		</h1>
		<div class="position-relative loginboxbg">
			<div id="login-box" class="login-box visible widget-box no-border">
				<form action="login.do" method="POST" onsubmit="return login();" id="loginForm">
					<fieldset>
						<div class="login_input">
							<label class="block clearfix">
								<span class="block input-icon">
									<input type="text" class="form-control" value="admin" placeholder="请输入账户" name="username" maxlength="50" id="username"/>
									<i class="icon-user"></i>
								</span>
							</label>
							<label class="block clearfix">
								<span class="block input-icon">
									<input type="password" class="form-control" value="123456" placeholder="请输入账户" name="password" maxlength="50" id="password"/>
									<i class="icon-lock"></i>
								</span>
							</label>
						</div>
						<div class="error errorbox"></div>
						<div class="clearfix">
							<label class="inline mepass">
								<input type="checkbox" class="ace" />
								<span class="lbl white"> 记住密码 </span>
							</label>
							<button type="submit" class="width-35 pull-right btn-sm loginbtn">
								<i class="icon-key"></i>
								登录
							</button>
						</div>
						<div class="space-4"></div>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function login(){
			var username = $("input[name='username']").val();
			username = $.trim(username);
			if(username == ''){
				layer.tips('请填写用户名', '#username');
				return false;
			}
			var password = $("input[name='password']").val();
			password = $.trim(password);
			if(password == ''){
				layer.tips('请填写密码', '#password');
				return false;
			}
			$("#loginForm").submit();
			return false;
		}
	</script>
</body>
</html>
